package com.elitel.frame.main.dao;

import com.elitel.frame.main.entity.SysReqLog;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * 访问控制-调用次数统计(SysReqLog)表数据库访问层
 *
 * @author makejava
 * @since 2023-12-20 18:08:51
 */
public interface SysReqLogMapper {
    /**
     * 新增数据
     *
     * @param sysReqLog 实例对象
     * @return 影响行数
     */
    int insert(SysReqLog sysReqLog);



    List<SysReqLog> getAppReqCounts(@Param("servicecode") String servicecode, @Param("stm") Timestamp stm, @Param("etm")Timestamp etm,@Param("appCode")  String appCode,@Param("servicename")   String servicename,@Param("flag")String flag, @Param("servCodes")List<String> servCodes);

    List<SysReqLog> getAppReqAll(@Param("guid") String guid,@Param("appCode")  String appCode,@Param("servicename")   String servicename);


    List<SysReqLog> getAppReqCountsTm(@Param("servicecode")String servicecode, @Param("appCode")String appCode, @Param("stm") Timestamp stm, @Param("etm")Timestamp etm,@Param("flag")String flag, @Param("servCodes")List<String> servCodes);

    List<Map<String, Object>> selectDetail(@Param("status") String status, @Param("flag")String flag, @Param("servCodes")List<String> servCodes);

    List<Map<String, Object>> selectTopAppByDate(@Param("stdt") LocalDate stdt, @Param("flag")String flag, @Param("servCodes")List<String> servCodes);

    List<Map<String, Object>> selectTopServerByDate(@Param("stdt")LocalDate stdt, @Param("flag")String flag, @Param("servCodes")List<String> servCodes);

    List<Map<String, Object>> selectRec7Days(@Param("stdt")LocalDate stdt, @Param("flag")String flag, @Param("servCodes")List<String> servCodes);

    List<String> getByTentId();
}

